package cn.tedu.test;

public class MyRequest {

    public static void main(String[] args) {
        MyRequest my = new MyRequest();
        my.getParamter();
    }
    public void getParamter(){
        String url = "http://localhost:8080/cgb2109javaweb02_war_exploded/ServletDemo06?user=rose&pwd=111";
        String a = url.split("\\?")[1];
        String[] a1 = a.split("&");
        for (String a2 :
                a1) {
            String b =a2.split("=")[1];
            System.out.println(b);
        }
    }
}
